﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Adnc.WebApi.Shared
{
    /// <summary>
    /// 结果包装类
    /// </summary>
    /// <typeparam name="TValue"></typeparam>
    public class WYTActionResult<TValue>
    {

        public WYTActionResult()
        {
        }

        public WYTActionResult(TValue value)
        {
            Data = value;
        }

        public WYTActionResult(int code, string msg)
        {
            Code = code;
            Msg = msg;
        }

        public WYTActionResult(int code, string msg, TValue value)
        {
            Code = code;
            Msg = msg;
            Data = value;
        }


        public int Code { get; set; } = 200;

        public string Msg { get; set; }

        public TValue Data { get; set; }
    }


    public class WYTActionResult
    {

        public WYTActionResult()
        {
        }

        public WYTActionResult(int code, string msg)
        {
            Code = code;
            Msg = msg;
        }

        public int Code { get; set; } = 200;

        public string Msg { get; set; }

        public string Data { get; set; }
    }
}
